package com.malinkang.sqlite;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Transient;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by malk on 2016/12/13.
 */
@Entity()
public class Student {
    @Id  private long no;
    @NotNull @Unique private int age;
    @Property(nameInDb = "studentName") @Unique private String name;
    @Transient private String nickname;



    @Generated(hash = 773426453)
    public Student(long no, int age, String name) {
        this.no = no;
        this.age = age;
        this.name = name;
    }

    @Generated(hash = 1556870573)
    public Student() {
    }



    public long getNo() {
        return no;
    }

    public void setNo(long no) {
        this.no = no;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "no=" + no +
                ", age=" + age +
                ", name='" + name + '\'' +
                ", nickname='" + nickname + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

}
